<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
  
      
</body>
        
<script>
for (var i = 0; i <= 8; i++) {
            for (var m = 8; m > i; m--) {
                document.write("&nbsp;&nbsp&nbsp;");
            }
            for (var o = 0; o <= i; o++) {
                document.write(o + "&nbsp;");
            }
            for (var p = i - 1; p >= 0; p--) {
                document.write(p + "&nbsp;");
            }
            document.write("<br>");
        }
    </script>
</html>